<%@ Page Language="C#" MasterPageFile="MasterPage.master" ValidateRequest="false"  AutoEventWireup="true" CodeFile="PoolEdt.aspx.cs" Inherits="PoolEdt" %>

<asp:Content ID="cntPool" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div>
        <br />
        <strong>Pool<br />
        </strong>
        <br />
        <asp:GridView ID="gvPool" runat="server" AutoGenerateColumns="False" Height="133px" EmptyDataText="No Pools Found"
            Width="571px" AllowPaging="True" AllowSorting="True" 
            OnSorting="gvPool_Sorting" OnRowCommand="gvPool_RowCommand" OnRowDataBound="gvPool_RowDataBound" OnRowUpdating="gvPool_RowUpdating" OnPageIndexChanging="gvPool_PageIndexChanging"
             HeaderStyle-HorizontalAlign="left">
            <Columns>
                <asp:BoundField HeaderText="Pool ID"  DataField="PoolID"  ReadOnly="True" SortExpression="PoolID"/>
                <asp:TemplateField HeaderText="Pool Name" SortExpression="PoolName">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("PoolName") %>' MaxLength="80" onkeypress="return ValidateKey()" Width="80%"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1">*</asp:RequiredFieldValidator>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# Bind("PoolName") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:ButtonField Text="edit" ButtonType="Button" CommandName="EditPool" InsertVisible="False" />
                <asp:ButtonField Text="delete" ButtonType="Button" CommandName="DeletePool" InsertVisible="False" />
                <asp:ButtonField Text="cancel" ButtonType="Button" CommandName="CancelPool" />
            </Columns>
            <PagerSettings Mode="NumericFirstLast"/>
            <HeaderStyle HorizontalAlign="Left" />
        </asp:GridView>
    </div>
    <br />
    <asp:Button ID="btnAddPool" runat="server" Text="Add Pool" OnClick="btnAddPool_Click" />
    
    <asp:Button id="btnSave" onclick="btnSavePool_Click" runat="server" Text="Save Pool"></asp:Button>
    
    <asp:TextBox Visible="false" ID="tbSortDirection" runat="server"></asp:TextBox>
    <asp:TextBox Visible="false" ID="tbPage" runat="server"></asp:TextBox>
    <asp:TextBox Visible="false" ID="tbSortProperty" runat="server"></asp:TextBox>    
</asp:Content>